package judesart.app.domain;

@SuppressWarnings("deprecation")
public class Note_FieldSerializer {
  private static native java.lang.String getDescription(judesart.app.domain.Note instance) /*-{
    return instance.@judesart.app.domain.Note::description;
  }-*/;
  
  private static native void  setDescription(judesart.app.domain.Note instance, java.lang.String value) /*-{
    instance.@judesart.app.domain.Note::description = value;
  }-*/;
  
  private static native java.lang.Long getImageId(judesart.app.domain.Note instance) /*-{
    return instance.@judesart.app.domain.Note::imageId;
  }-*/;
  
  private static native void  setImageId(judesart.app.domain.Note instance, java.lang.Long value) /*-{
    instance.@judesart.app.domain.Note::imageId = value;
  }-*/;
  
  private static native java.lang.String getKey(judesart.app.domain.Note instance) /*-{
    return instance.@judesart.app.domain.Note::key;
  }-*/;
  
  private static native void  setKey(judesart.app.domain.Note instance, java.lang.String value) /*-{
    instance.@judesart.app.domain.Note::key = value;
  }-*/;
  
  private static native judesart.app.domain.Project getProject(judesart.app.domain.Note instance) /*-{
    return instance.@judesart.app.domain.Note::project;
  }-*/;
  
  private static native void  setProject(judesart.app.domain.Note instance, judesart.app.domain.Project value) /*-{
    instance.@judesart.app.domain.Note::project = value;
  }-*/;
  
  public static void deserialize(com.google.gwt.user.client.rpc.SerializationStreamReader streamReader, judesart.app.domain.Note instance) throws com.google.gwt.user.client.rpc.SerializationException{
    setDescription(instance, streamReader.readString());
    setImageId(instance, (java.lang.Long) streamReader.readObject());
    setKey(instance, streamReader.readString());
    setProject(instance, (judesart.app.domain.Project) streamReader.readObject());
    
  }
  
  public static native judesart.app.domain.Note instantiate(com.google.gwt.user.client.rpc.SerializationStreamReader streamReader) throws com.google.gwt.user.client.rpc.SerializationException/*-{
    return @judesart.app.domain.Note::new()();
  }-*/;
  
  public static void serialize(com.google.gwt.user.client.rpc.SerializationStreamWriter streamWriter, judesart.app.domain.Note instance) throws com.google.gwt.user.client.rpc.SerializationException {
    streamWriter.writeString(getDescription(instance));
    streamWriter.writeObject(getImageId(instance));
    streamWriter.writeString(getKey(instance));
    streamWriter.writeObject(getProject(instance));
    
  }
  
}
